package com.example.dqhperformance.enums;

import lombok.ToString;

/**
 * @ClassName ResultEnums
 * @Description
 * @Author MZ
 * @Date 2024/5/8 23:32
 */
@ToString
public enum ResultEnums {

    SUCCESS(200, "请求成功"),
    SYS_ERROR(1, "系统异常"),
    PARAM_ERROR(2, "缺少参数，或参数格式错误"),
    SIGN_ERROR(3, "签名验证失败"),
    AUTH_ERROR(4, "未授权或授权过期"),
    FLOW_CONTROL(5, "接口流控"),
    OTHER_REASON(9, "其他原因"),

            ;

    // 响应码
    private Integer code;
    // 响应信息
    private String message;

    ResultEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
